[ENG-677] weaviate precheck fix#604
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
Fixes Weaviate cloud precheck to actually establish and close a client connection instead of constructing and discarding a generator, and adds an integration test to verify failure on invalid connection configuration.
- Use get_client() as a context manager in precheck to validate connectivity.
- Add an integration test that expects DestinationConnectionError on invalid Weaviate config.
- Bump version to 1.2.20 and update CHANGELOG.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| unstructured_ingest/processes/connectors/weaviate/weaviate.py | Use get_client() within a context manager in precheck to ensure a real connection attempt and proper cleanup. |
| test/integration/connectors/weaviate/test_cloud.py | Add integration test for precheck failure on invalid configuration; update imports. |
| unstructured_ingest/version.py | Bump version to 1.2.20. |
| CHANGELOG.md | Document the precheck fix in 1.2.20. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| @pytest.mark.tags(CONNECTOR_TYPE, DESTINATION_TAG, VECTOR_DB_TAG) | ||
| def test_weaviate_precheck_invalid_credentials(): | ||
| """Test that precheck properly validates connection with invalid credentials.""" |
There was a problem hiding this comment.
The docstring states 'invalid credentials', but the test includes an invalid cluster_url as well. Update the docstring to reflect the scenario (e.g., 'invalid configuration or unreachable cluster') or modify the test to isolate invalid-credential behavior.
Suggested change
| """Test that precheck properly validates connection with invalid credentials.""" | |
| """Test that precheck properly validates connection failures due to invalid configuration or unreachable cluster.""" |
mpolomdeepsense
approved these changes
Oct 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
in the weaviate cloud precheck we were creating a generator object and discarding it. So everything was passing.
Note
Fixes Weaviate cloud precheck to actually validate the connection (opens client context) and adds tests to ensure invalid credentials fail; bumps version to 1.2.20.
precheck()to open the client context (with get_client():) so connection validation actually occurs.DestinationConnectionError.test_weaviate_precheck_invalid_credentialsto assertDestinationConnectionErroron bad creds.IngestValueError) in existing tests.__version__to1.2.20and updateCHANGELOG.md.Written by Cursor Bugbot for commit f09c6c9. This will update automatically on new commits. Configure here.